{% extends 'base.html.twig' %}

{% block title %}
    Images Info Form
{% endblock %}

{% block body %}

    <style>
        .image-grid {
            display: flex;
            justify-content: center;
            align-items: center;
            flex-wrap: wrap;
            max-width: 1200px;
            margin: 0 auto;
            background-color: #e0e0e0;
            padding: 40px;
            box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
            border-radius: 15px;
        }
        .image-grid img {
            width: 250px;
            height: 180px;
            object-fit: cover;
            object-position: center;
            border-radius: 10px;
            transition: transform 0.3s ease-in-out;
            margin: 10px;
        }
        .image-grid img:hover {
            transform: scale(1.1);
        }

        .center-text {
            text-align: center;
            margin-bottom: 20px;
        }
    </style>

    <div class="image-grid">
        {% for image in imagesInfo.images() %}
            <img src="{{ image }}" alt="Image" />
        {% endfor %}
    </div>

    <div class="center-text">
        <p>Total Images: {{ imagesInfo.getCount() }}</p>
    </div>
    <div class="center-text">
        <p>Total Memory Used: {{ imagesInfo.getMemorySumInMB() | round(2) }} MB</p>
    </div>
{% endblock %}


